import Http from "../Http";
import {stringify} from "qs";

// 订单增改查 评论
export default {
    lists(data = {}) {
        return Http.get("/crs/order/list", data)
    },
    info(id) {
        return Http.get(`/crs/order/${id}`)
    },
    // 订单评论
    comment(data) {
        return Http.put(`/crs/order/userCommentOrder`, stringify(data))
    },

    create(data) {
        return Http.post("/crs/order/newOrder", stringify(data))
    },
    update(data) {
        return Http.put("/crs/order/updateStatus", stringify(data))
    },
    // 可选状态，1成功预约，2被拒绝的预约，3完成的预约
    setStatus(data) {
        return Http.put("/crs/order/updateStatus", stringify(data))
    }
}
